package com.irdstudio.apicenter.frame.tag.bootstrap;

import org.apache.commons.lang3.StringUtils;

import com.irdstudio.apicenter.frame.core.jdbc.container.DataRow;

/**
 * 直接解释HTML
 * 
 * @author zs.ligm
 * @version 1.0
 * @date 2015-06-26
 */
public class THtml extends TAbstractText {

	private static final long serialVersionUID = 1L;

	/* html内容 */
	private String innerHtml;

	@Override
	public void renderTag(StringBuffer sb, DataRow dataRow) {
		sb.append("			<td align=\"center\" width=\"48\">");
		sb.append(this.getInnerHtml());
		sb.append("</td>");
	}

	public void setInnerHtml(String innerHtml) {
		this.innerHtml = innerHtml;
	}

	public String getInnerHtml() {
		return innerHtml;
	}

	@Override
	public Object clone() {

		THtml tag = new THtml();
		tag.label = this.label;
		tag.id = this.id;
		tag.defvalue = this.defvalue;
		tag.dictname = this.dictname;
		tag.innerHtml = this.innerHtml;
		tag.align = StringUtils.isEmpty(this.align) ? "left" : this.align;
		return tag;
	}

}
